<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
<meta name="viewport" content="width=320px,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title><?=$title?></title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="popup-window.js"></script>
<link rel="stylesheet" type="text/css" href="popup-window.css" />
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script>
	$(document).ready(function(){
		$('.back-button').click(function(){
			window.history.back();	
		});
	});
</script>
<script type="text/javascript">
function clickChonHet(ele){
	var status=ele.checked;
	$("input[name='chon']").each(function(){this.checked=status;})
}
function popuploadbel(ele){
	var popID = $(ele).attr('rel'); //Get Popup Name
    var popURL = $(ele).attr('href'); //Get Popup href to define size
                    
    //Pull Query & Variables from href URL
    var query= popURL.split('?');
    var dim= query[1].split('&');
    var popWidth = dim[0].split('=')[1]; //Gets the first query string value

    //Fade in the Popup and add close button
    $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"><span class="btn_close">X</span></a>');
    
    //Define margin for center alignment (vertical + horizontal) - we add 80 to the height/width to accomodate for the padding + border width defined in the css
    var popMargTop = ($('#' + popID).height() + 80) / 2;
    var popMargLeft = ($('#' + popID).width() + 80) / 2;
    
    //Apply Margin to Popup
    $('#' + popID).css({ 
            'margin-top' : -popMargTop,
            'margin-left' : -popMargLeft
    });
    
    //Fade in Background
    $('body').append('<div id="fade"></div>'); //Add the fade layer to bottom of the body tag.
    $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer 
    $('a.close, #fade, .iclose').live('click', function() { //When clicking on the close or fade layer...
        $('#fade , .popup_block').fadeOut(function() {
              $('#fade, a.close').remove();  
	}); //fade them both out
	      
	      return false;
	});
}
</script>
</head>
<?php 
$us = $_SESSION['user'];
?>
<body>
	<div class="wrapper">

    	<div class="top">

        	<div class="lang">
                <a href="operations/set_lang.php?lang=en"><img src="images/en.gif" alt="" /></a>
                <a href="operations/set_lang.php?lang=vn"><img src="images/vn.gif" alt="" /></a>
                <a href="operations/set_lang.php?lang=kr"><img src="images/kr.gif" alt="" /></a>
            </div>
        </div>

         <div class="nuser"><a href="#"><?=$us?></a> - <a href="logout.php">Logout</a></div>

        <?include($content);?>
        
        <div class="footer">
        	<span>2012 Elisoft Company - All right reserved</span>
        </div>
    </div>    
</body>
</html>
<?php 
if(isset($connection))
mysql_close($connection);

?>
